package com.gdut.huayan.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gdut.huayan.validation.group.GroupAdd;
import com.gdut.huayan.validation.group.GroupUpdate;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;


@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_charity")
public class Charity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @Null(groups = {GroupAdd.class})
    @NotNull(groups = {GroupUpdate.class})
    private Long id;

    private String paperAddress;

    @NotBlank(groups = {GroupAdd.class},message = "联系人姓名不能为空")
    private String contactName;

    @NotBlank(groups = {GroupAdd.class},message = "联系人电话不能为空")
    private String contactPhone;

    private String remark;


}
